<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>8.3.6.寄生式组合继承</title>
</head>
<body>
    
</body>
<script>
    // 
    function object(o){
        function F(){}
        F.prototype = o 
        return new F();
    }

    let a01 = object({name:'hh' , age:18 });

    console.log(a01);

    function inheritPrototype(subType, superType) { 
        let prototype = object(superType.prototype); // 创建对象
        prototype.constructor = subType; // 增强对象
        subType.prototype = prototype; // 赋值对象
    }


    
</script>
</html>